import cv2
import numpy as np
image=cv2.imread("dog_1.png")
cv2.imshow("Input",image)
mask=np.zeros(image.shape,dtype=np.uint8)
mask[50:160,200:280,]=255
cv2.imshow("Mask",mask)
result=cv2.bitwise_and(image,mask)
cv2.imshow("Result",result)
cv2.waitKey()
cv2.destroyAllWindows()